#pragma once

#include "DcmParser.h"

#define UM_DCMTAG_CLOSE WM_USER + 18


class CBaseImage;

class CDcmTagsUI : public WindowImplBase, public IListCallbackUI
{
public:
	CDcmTagsUI(HWND hParent = NULL, HWND hOwner = NULL, BOOL bSelfDel = FALSE);
	~CDcmTagsUI();

	vector<DcmTagInfo> m_listData;
	vector<DcmTagInfo> m_listFilter;
	void RefreshList(const vector<DcmTagInfo>& taglist);
	void FilterList(const DString filterText);
	void SetWindowTitle(DString title);
	void SetImage(CBaseImage* pImg);

public:

	LPCTSTR GetWindowClassName() const;

	virtual void OnFinalMessage(HWND hWnd);

	virtual void InitWindow();

	//virtual LRESULT ResponseDefaultKeyEvent(WPARAM wParam);

	virtual DString GetSkinFile();

	virtual DString GetSkinFolder();

	virtual CControlUI* CreateControl(LPCTSTR pstrClass);

	virtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);

	virtual LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

	virtual LPCTSTR GetItemText(CControlUI* pControl, int iIndex, int iSubItem);

protected:
	BOOL m_bSelfDel;
	HWND m_hOwner;
	CBaseImage* m_pImage;
	int  m_nCurSel;
	void Notify(TNotifyUI& msg);
	void OnPrepare(TNotifyUI& msg);
	void OnExit(TNotifyUI& msg);

};

